#ifndef CAMERA_H_
#define CAMERA_H_

#include "Vector2D.h"
#include "Object.h"
#include "ObjectList.h"
#include "TextureManager.h"
#include "Background.h"
#include "include.h"

class Camera
{

	Vector2D velocity;
	Vector2D acceleration;
	Vector2D deltaPosition;

	float parallaxScroll;
	int transitionCount;
	bool focusedOnGround;
	bool focusedOnGroup;
	bool isReturning;
	float rotation;
	float rotationalVelocity;
	float rotationalAcceleration;
	Object * focusObject;
	Background * background;

	Vector2D focusPoint;
	Vector2D desiredSize;
	float zoomTime;
	float translationRatio;
	float translationTime;
	float transitionTime;
	float currentTransition;
	Vector2D currentOffset;
	Vector2D deltaOffset;
	Vector2D startingOffset;

	public:

	TextureManager * textureManager;
	Vector2D size;
	Vector2D position;
	Camera();
	Camera(Object * focusObject, TextureManager * textureManager);
	~Camera();
	void SetBackground(Background * background);
	void Draw();
	void SetSize(Vector2D size);
	void ZoomIn();
	void ZoomOut();
	//void DrawParallax();
	void Think(double elaspedTime);
	Vector2D GetPosition();
	void SetPosition(Vector2D position);
	void SetFocusObject(Object * object, bool snap);
	void ReturnToFocusObject();
	void ReturnToFocusObject(Object * object);
	void ResetSize();
	Vector2D ConvertToCameraSpace(Vector2D worldPoint);
	Vector2D ConvertToWorldSpace(Vector2D cameraPoint);
	void SetFocusObjectList(ObjectList * list, bool snap);
};

#endif /*CAMERA_H_*/
